﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace ClassLibrary1
{
    public class AnonymousTypes
    {
        public event EventHandler CoolEvent;

        private void AnonymousDelegate()
        {
            CoolEvent += (x, y) => Delegate();
        }

        private void Delegate()
        {
            
        }

        private void AnonymousMethods()
        {
            var list = new List<string>();
            list = (from x in list where Foo(x) select x).ToList();
        }

        private bool Foo(string bar)
        {
            return true;
        }

        public IEnumerable<char> Yield(string g)
        {
            foreach(var c in g)
            {
                yield return (char)(c + 1);
            }
        }
    }
}
